home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / What's New? / Tool Chest / ColorSync™ 1.0.5 / Interfaces / AIncludes / CMApplication.a next >
Encoding:
Text File  |  1994-04-11  |  8.5 KB  |  322 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Header for Color Matching aware applications
  5. ;
  6. ;    Copyright:    © 1992-94 by Apple Computer, Inc., all rights reserved.
  7. ;
  8. ;___________________________________________________________________________
  9.  IF &TYPE('__IncludingCMApplication__') = 'UNDEFINED' THEN
  10. __IncludingCMApplication__   SET 1
  11.  
  12.     IF &TYPE('__IncludingQuickEqu__') = 'UNDEFINED' THEN
  13.     INCLUDE 'QuickEqu.a'
  14.     ENDIF
  15.  
  16. gestaltColorMatchingVersion                        EQU        'cmtc'
  17.  
  18. CMTrap                                            EQU        $ABEE
  19.  
  20. ; PicComments
  21. CMBeginProfile                                    EQU        220
  22. CMEndProfile                                    EQU        221
  23. CMEnableMatching                                EQU        222
  24. CMDisableMatching                                EQU        223
  25.  
  26. ; Defines for fieldMask in profile search record
  27. kMatchCMMType                                    EQU        $00000001
  28. kMatchApplProfileVersion                        EQU        $00000002
  29. kMatchDataType                                    EQU        $00000004
  30. kMatchDeviceType                                EQU        $00000008
  31. kMatchDeviceManufacturer                        EQU        $00000010
  32. kMatchDeviceModel                                EQU        $00000020
  33. kMatchDeviceAttributes                            EQU        $00000040
  34. kMatchFlags                                        EQU        $00000080
  35. kMatchOptions                                    EQU        $00000100
  36. kMatchWhite                                        EQU        $00000200
  37. kMatchBlack                                        EQU        $00000400
  38.  
  39.  
  40. ; Profile Header version
  41. kCMApplProfileVersion                            EQU        $0100
  42.  
  43. ; Data types
  44. rgbData                                            EQU        'RGB '
  45. cmykData                                        EQU        'CMYK'
  46. grayData                                        EQU        'GRAY'
  47. xyzData                                            EQU        'XYZ '
  48.  
  49. ; Device types
  50. monitorDevice                                    EQU        'mntr'
  51. scannerDevice                                    EQU        'scnr'
  52. printerDevice                                    EQU        'prtr'
  53. qdSystemDevice                                    EQU        'sys '
  54. qdGDevice                                        EQU        'gdev'
  55.  
  56. ; Profile flags
  57. CMNativeMatchingPreferred                         EQU        $00000001        ; Default to native not preferred
  58. CMTurnOffCache                                    EQU        $00000002        ; Default to turn on CMM cache
  59.  
  60. ; Profile options
  61. CMPerceptualMatch                                EQU        $00000000        ; Default. For photographic images
  62. CMColorimetricMatch                                EQU        $00000001        ; Exact matching when possible
  63. CMSaturationMatch                                EQU        $00000002        ; For solid colors
  64.  
  65. ; ColorSync result codes
  66. CMNoError                                        EQU        0
  67. CMProfileError                                    EQU        -170
  68. CMMethodError                                    EQU        -171
  69. CMMemFullError                                    EQU        -172
  70. CMUnimplementedError                            EQU        -173
  71. CMParamError                                    EQU        -174
  72. CMMethodNotFound                                EQU        -175            ; CMM not present
  73. CMProfileNotFound                                EQU        -176            ; Responder error
  74. CMProfilesIdentical                                EQU        -177            ; Profiles the same
  75. CMCantConcatenateError                            EQU        -178            ; Profile can't be concatenated
  76. CMCantXYZ                                        EQU        -179            ; CMM cant handle XYZ space
  77. CMCantDeleteProfile                                EQU        -180            ; Responder error
  78. CMUnsupportedDataType                            EQU        -181            ; Responder error
  79. CMNoCurrentProfile                                EQU        -182            ; Responder error
  80.  
  81. grayResponse                                    EQU        0
  82. redResponse                                        EQU        1
  83. greenResponse                                    EQU        2
  84. blueResponse                                    EQU        3
  85. cyanResponse                                    EQU        4
  86. magentaResponse                                    EQU        5
  87. yellowResponse                                    EQU        6
  88. ucrResponse                                        EQU        7
  89. bgResponse                                        EQU        8
  90. onePlusLastResponse                                EQU        9
  91.  
  92. ; Printing Stuff that will be moved later
  93. enableColorMatchingOp                            EQU        12
  94. registerProfileOp                                EQU        13
  95.  
  96. ; Types
  97.  
  98. XYZColor                                        RECORD    0
  99. X                                                DS.W    1                ; 1.15 bit unsigned fixed numbers
  100. Y                                                DS.W    1
  101. Z                                                DS.W    1
  102.                                                 ENDR
  103.  
  104. CMYKColor                                        RECORD    0
  105. cyan                                            DS.W    1
  106. magenta                                            DS.W    1
  107. yellow                                            DS.W    1
  108. black                                            DS.W    1
  109.                                                 ENDR
  110.  
  111. CMColor                                            RECORD    0
  112. rgb                                                DS        RGBColor
  113.                                                 ORG        rgb
  114. xyz                                                DS        XYZColor
  115.                                                 ORG        rgb
  116. cmyk                                            DS        CMYKColor
  117. size                                            EQU        *
  118.                                                 ENDR
  119.  
  120. CMHeader                                        RECORD    0
  121. size                                            DS.L    1                ; This is the total size of the Profile including custom data
  122. CMMType                                            DS.l    1                ; Corresponding CMM
  123. applProfileVersion                                DS.L    1                ; Version of CMProfile format
  124. dataType                                        DS.L    1                ; rgbData, etc.
  125. deviceType                                        DS.L    1                ; monitorDevice, etc.
  126. deviceManufacturer                                DS.L    1                ; Registered with DTS
  127. deviceModel                                        DS.L    1                ; Specific to Manufacturer
  128. deviceAttributes                                DS.L    2                ; Attributes like paper, ink, etc.
  129. profileNameOffset                                DS.L    1                ; Offset to profile name from top of data
  130. customDataOffset                                DS.L    1                ; Offset to custom data from top of data
  131. flags                                            DS.L    1
  132. options                                            DS.L    1
  133. white                                            DS        XYZColor
  134. black                                            DS        XYZColor
  135. recordSize                                        EQU        *
  136.                                                 ENDR
  137.  
  138. CMProfileSearchRecord                            RECORD    0
  139. header                                            DS        CMHeader
  140. fieldMask                                        DS.L    1
  141. reserved                                        DS.L    2
  142. size                                            EQU        *
  143.                                                 ENDR
  144.  
  145. CMProfileChromaticities                            RECORD    0
  146. red                                                DS        XYZColor
  147. green                                            DS        XYZColor
  148. blue                                            DS        XYZColor
  149. cyan                                            DS        XYZColor
  150. magenta                                            DS        XYZColor
  151. yellow                                            DS        XYZColor
  152. size                                            EQU        *
  153.                                                 ENDR
  154.  
  155. IString                                            RECORD    0
  156. theScript                                        DS.W    1
  157. theString                                        DS.B    64                ; Str63
  158. size                                            EQU        *
  159.                                                 ENDR
  160.  
  161. CMProfileResponse                                RECORD    0
  162. counts                                            DS.W    onePlusLastResponse
  163. data                                            DS.W    1                ; Variable size
  164.                                                 ENDR
  165.  
  166. CMProfile                                        RECORD    0
  167. header                                            DS        CMHeader
  168. profile                                            DS        CMProfileChromaticities
  169. response                                        DS        CMProfileResponse ; Variable size
  170. profileName                                        DS        IString            ; Variable size
  171. customData                                        DS.W    1                ; Optional variable length custom CMM data. Word aligned.
  172.                                                 ENDR
  173.  
  174. ; Printing Stuff that will be moved later
  175. ; PrGeneral parameter blocks
  176. TEnableColorMatchingBlk                            RECORD    0
  177. iOpCode                                            DS.W    1
  178. iError                                            DS.W    1
  179. lReserved                                        DS.L    1
  180. hPrint                                            DS.L    1
  181. fEnableIt                                        DS.B    1
  182.                                                 ALIGN    2
  183. size                                            EQU        *
  184.                                                 ENDR
  185.  
  186. TRegisterProfileBlk                                RECORD    0
  187. iOpCode                                            DS.W    1
  188. iError                                            DS.W    1
  189. lReserved                                        DS.L    1
  190. hPrint                                            DS.L    1
  191. fRegisterIt                                        DS.B    1
  192.                                                 ALIGN    2
  193. size                                            EQU        *
  194.                                                 ENDR
  195.  
  196. ; High Level Calls
  197.                                                 MACRO
  198.                                                 _BeginMatching
  199.                                                 MOVE.L #$000C000A, DO
  200.                                                 DC.W    $ABEE            ; TB 03EE
  201.                                                 ENDM
  202.  
  203.                                                 MACRO
  204.                                                 _EndMatching
  205.                                                 MOVE.L #$0004000B, DO
  206.                                                 DC.W    $ABEE            ; TB 03EE
  207.                                                 ENDM
  208.  
  209.                                                 MACRO
  210.                                                 _GetProfile
  211.                                                 MOVE.L    #$00100005, D0
  212.                                                 DC.W    $ABEE            ; TB 03EE
  213.                                                 ENDM
  214.  
  215.                                                 MACRO
  216.                                                 _SetProfile
  217.                                                 MOVE.L    #$000C0006, D0
  218.                                                 DC.W    $ABEE            ; TB 03EE
  219.                                                 ENDM
  220.  
  221.                                                 MACRO
  222.                                                 _SetProfileDescription
  223.                                                 MOVE.L    #$00100010, D0
  224.                                                 DC.W    $ABEE            ; TB 03EE
  225.                                                 ENDM
  226.  
  227.                                                 MACRO
  228.                                                 _GetColorSyncFolderSpec
  229.                                                 MOVE.L    #$000C0011, D0
  230.                                                 DC.W    $ABEE            ; TB 03EE
  231.                                                 ENDM
  232.  
  233.                                                 MACRO
  234.                                                 _GetIndexedProfile
  235.                                                 MOVE.L    #$00140012, D0
  236.                                                 DC.W    $ABEE            ; TB 03EE
  237.                                                 ENDM
  238.  
  239.                                                 MACRO
  240.                                                 _DeleteDeviceProfile
  241.                                                 MOVE.L    #$000C0013, D0
  242.                                                 DC.W    $ABEE            ; TB 03EE
  243.                                                 ENDM
  244.  
  245. ; Data interchange routines
  246.                                                 MACRO
  247.                                                 _UseProfile
  248.                                                 MOVE.L    #$00040008, D0
  249.                                                 DC.W    $ABEE            ; TB 03EE
  250.                                                 ENDM
  251.  
  252.                                                 MACRO
  253.                                                 _DrawMatchedPicture
  254.                                                 MOVE.L    #$000C0009, D0
  255.                                                 DC.W    $ABEE            ; TB 03EE
  256.                                                 ENDM
  257.  
  258.                                                 MACRO
  259.                                                 _EnableMatching
  260.                                                 MOVE.L    #$0002000D, D0
  261.                                                 DC.W    $ABEE            ; TB 03EE
  262.                                                 ENDM
  263.  
  264. ; Profile concatenation
  265.                                                 MACRO
  266.                                                 _ConcatenateProfiles
  267.                                                 MOVE.L    #$000C000C, D0
  268.                                                 DC.W    $ABEE            ; TB 03EE
  269.                                                 ENDM
  270.  
  271. ; Profile manipulation routines
  272.                                                 MACRO
  273.                                                 _GetProfileName
  274.                                                 MOVE.L    #$0008000E, D0
  275.                                                 DC.W    $ABEE            ; TB 03EE
  276.                                                 ENDM
  277.  
  278.                                                 MACRO
  279.                                                 _GetProfileAdditionalDataOffset
  280.                                                 MOVE.L    #$0004000F, D0
  281.                                                 DC.W    $ABEE            ; TB 03EE
  282.                                                 ENDM
  283.  
  284. ; Low level color calculation routines
  285.                                                 MACRO
  286.                                                 _CWNewColorWorld
  287.                                                 MOVE.L    #$000C0000, D0
  288.                                                 DC.W    $ABEE            ; TB 03EE
  289.                                                 ENDM
  290.  
  291.                                                 MACRO
  292.                                                 _CWDisposeColorWorld
  293.                                                 MOVE.L    #$00040001, D0
  294.                                                 DC.W    $ABEE            ; TB 03EE
  295.                                                 ENDM
  296.  
  297.                                                 MACRO
  298.                                                 _CWMatchColors
  299.                                                 MOVE.L    #$000C0002, D0
  300.                                                 DC.W    $ABEE            ; TB 03EE
  301.                                                 ENDM
  302.  
  303.                                                 MACRO
  304.                                                 _CWCheckColors
  305.                                                 MOVE.L    #$00100003, D0
  306.                                                 DC.W    $ABEE            ; TB 03EE
  307.                                                 ENDM
  308.  
  309.                                                 MACRO
  310.                                                 _CWMatchPixMap
  311.                                                 MOVE.L    #$00100004, D0
  312.                                                 DC.W    $ABEE            ; TB 03EE
  313.                                                 ENDM
  314.  
  315.                                                 MACRO
  316.                                                 _CWCheckPixMap
  317.                                                 MOVE.L    #$00140007, D0
  318.                                                 DC.W    $ABEE            ; TB 03EE
  319.                                                 ENDM
  320.  
  321.                                                 ENDIF    ;   ...already included
  322.